#include "SMPPBroadcastAreaIdentifier.hpp"

using namespace smpp::pdu;

BroadcastAreaIdentifier::BroadcastAreaIdentifier(
const octetString &nValue):
TLV(TLVtags::TAG_BROADCAST_AREA_IDENTIFIER,nValue.size()),_Value(nValue){}

BroadcastAreaIdentifier::BroadcastAreaIdentifier(
const BroadcastAreaIdentifier &nBroadcastAreaIdentifier):
TLV(nBroadcastAreaIdentifier),
_Value(nBroadcastAreaIdentifier.getValue()){}

bool BroadcastAreaIdentifier::operator ==(
	const BroadcastAreaIdentifier &nBroadcastAreaIdentifier) const{
	return (TLV::operator == (nBroadcastAreaIdentifier) && 
			_Value == nBroadcastAreaIdentifier.getValue());
}

bool BroadcastAreaIdentifier::operator !=(
	const BroadcastAreaIdentifier &nBroadcastAreaIdentifier) const{
	return !this->operator == (nBroadcastAreaIdentifier);
}

BroadcastAreaIdentifier &BroadcastAreaIdentifier::operator = (
	const BroadcastAreaIdentifier &nBroadcastAreaIdentifier){
	if(*this == nBroadcastAreaIdentifier)
		return *this;
	TLV::operator = (nBroadcastAreaIdentifier);
	_Value = nBroadcastAreaIdentifier.getValue();
	return *this;
}

void BroadcastAreaIdentifier::setValue(const octetString &nValue){
	_Value = nValue;
}

const octetString &BroadcastAreaIdentifier::getValue() const{
	return _Value;
}
